<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:t="http://tms" xml:lang="en" lang="en">

<ui:composition template="../securedTemplate.xhtml">
    <ui:define name="title">#{localizer.localized('LOGS')}</ui:define>

    <ui:define name="body">
        <ui:decorate template="../navigationTabs.xhtml">
            <ui:param name="currentTab" value="logs"/>

            <table style="font-size:smaller;color:black;width:800px;">
                <tr>
                    <td align="left" valign="top">
                        <table width="100%">
                            <tr>
                                <td class="labelsColumn">
                                    #{localizer.localized('AREA')}:
                                </td>
                                <td style="width:80px;">
                                    <f:ajax render="logContentPanel" onerror="ajaxErrorsHandler">
                                        <h:selectOneMenu value="#{loggingViewBean.selectedArea}">
                                            <f:selectItem/>
                                            <c:forEach items="#{loggingViewBean.areas}" var="area">
                                                <f:selectItem itemLabel="#{localizer.localized(area)}" itemValue="#{area}" itemDisabled="#{not loggingViewBean.logAvailable[area]}"/>
                                            </c:forEach>
                                        </h:selectOneMenu>
                                    </f:ajax>
                                </td>
                                <td align="left">
                                    <h:panelGroup id="logContentPanel">
                                        <h:outputLink value="#{facesContextManager.contextPath}/content/logs/downloadLogPage.xhtml?logArea=#{loggingViewBean.selectedArea}" rendered="#{not empty loggingViewBean.selectedArea}">#{localizer.localized('CLICK_TO_GET_LOG')}</h:outputLink>
                                    </h:panelGroup>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </ui:decorate>
    </ui:define>
</ui:composition>

</html>